[PATCH] ITS#9171 Insert callback in the right place
authorOndřej Kuzník <ondra@mistotebe.net>
Fri, 21 Feb 2020 10:26:53 +0000 (10:26 +0000)
committerRyan Tandy <ryan@nardis.ca>
Wed, 15 Apr 2020 04:33:16 +0000 (05:33 +0100)
Gbp-Pq: Name ITS-9171-Insert-callback-in-the-right-place.patch

servers/slapd/overlays/ppolicy.c

index a8f8f3073b1f0926344a72cb303eeb8a0aca1b61..3c12024bdf2c16f3f81118acb55319d214e95192 100644 (file)
@@ -1323,9 +1323,8 @@ ppolicy_bind( Operation *op, SlapReply *rs )
                /* Setup a callback so we can munge the result */
 
                cb->sc_response = ppolicy_bind_response;
-               cb->sc_next = op->o_callback->sc_next;
                cb->sc_private = ppb;
-               op->o_callback->sc_next = cb;
+               overlay_callback_after_backover( op, cb, 1 );
 
                /* Did we receive a password policy request control? */
                if ( op->o_ctrlflag[ppolicy_cid] ) {
@@ -1469,9 +1468,8 @@ ppolicy_compare(
                /* Setup a callback so we can munge the result */
 
                cb->sc_response = ppolicy_compare_response;
-               cb->sc_next = op->o_callback->sc_next;
                cb->sc_private = ppb;
-               op->o_callback->sc_next = cb;
+               overlay_callback_after_backover( op, cb, 1 );
 
                op->o_bd->bd_info = (BackendInfo *)on;
                ppolicy_get( op, e, &ppb->pp );